home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / bbs / ny_010w1.zip / STRUCT.DOC < prev    next >
Text File  |  1996-03-24  |  11KB  |  275 lines

  1. NY2008 (update 4)
  2.  
  3. !!!
  4. NOTE: This file contains the structures of version 0.10 no InterBBS structs
  5. though
  6. !!!
  7. NOTE2:I found out about a misspelling which is CRAPS is supposed to be CRABS,
  8. it's still CRAPS in the datafiles (the text dropfile and the enum types), but
  9. be sure it's crabs when you display it to the user.
  10. !!!
  11.  
  12. These are the 'C' structures used in user files, .sts file and mail, and newz:
  13.  
  14. Also here is a description how they work and stuff like that ... READ ALL!!
  15.  
  16. NOTE: all numbers of records are 0 based ... 0=1st record, user number 0 is
  17. the first in the file, enemy number 0 is the first in the file .... this is
  18. done for easy seeking of records .... to get the pointer to the beginning of
  19. record 34 in the user file do:
  20.  
  21.   fseek(fpUserFile,34 * sizeof(user_rec),SEEK_SET);
  22.  
  23.  
  24.  
  25. These are the enumerated types:
  26. (!!!!!!be sure to store them as *UNSIGNED CHARACTERS* not int!!!!!)
  27. (or you can use character values directly to write to theuser file,
  28.  here's how that would work: first choice=0, second=1 ... e.g. POT=0, HASH=1)
  29.  
  30. typedef enum {HANDS,PEPPER,KNIFE,CHAIN,GUN,RIFLE,LASER_GUN,SHOTGUN,MACHINEGUN,GRANADE_LAUNCHER,BLASTER,A_BOMB} weapon;
  31. typedef enum {POT,HASH,LSD,COKE,PCP,HEROIN} drug_type;
  32. typedef enum {MALE,FEMALE} sex_type;
  33. typedef enum {HEADBANGER,HIPPIE,BIG_FAT_DUDE,CRACK_ADDICT,PUNK} guy_type;
  34. typedef enum {NONE,CRAPS,HERPES,SYPHILIS,AIDS} desease;
  35. typedef enum {ALIVE,UNCONCIOUS,DEAD} guy_status;
  36. typedef enum {NOWHERE,MOTEL,REG_HOTEL,EXP_HOTEL} hotel_type;
  37.  
  38.  
  39. And here is the structure of the user file (and the .sts file):
  40. (you should not use the user file in the IGM, but this structure is written
  41.  to the temporary file .sts which you should read and modify upon exit)
  42.  
  43. NOTE: With BETA 9 the name of the .sts file changed to
  44. n<zero padded node number>.sts (the old style .sts files exist but changing
  45. them will not make any difference. They are there only for crash recovery
  46. purposes)
  47.  
  48. NOTE: All the strings are null terminated, if you are using pascal, use a
  49. conversion routine! if you are just creating IGM it is probably better
  50. to use the text character information file, the .stt file, read the
  51. 3rdparty.doc for more info.
  52.  
  53. NOTE: Editting hitpoints and strenghts is only temporary so not recomended,
  54. these are reset to defaults each time the user rise a level ... this will
  55. be redone sometime in the future, but not yet ... (i strongly recomend
  56. against doing that, and under no circumstances do not make hitpoints
  57. larger that maxhitpoints, or make max hitpoints smaller!)
  58.  
  59. NOTE: Read the SCORE FILE INFO further on, on modifying this file!!!
  60.  
  61. //Player User File structure (beta9+ format)
  62. typedef struct {
  63.     //character records
  64.     char            bbsname[36],     //the BBS name of the user
  65.             name[25],        //the name of the character
  66.             say_win[41],     //what the user says when he wins
  67.             say_loose[41];   // "    "    "   "    "   "  looses
  68.     //integer records
  69.     int             rank,            //user rank (read score file info
  70.                      //in this document!!!)
  71.             days_not_on,     //days the user has been inactive
  72.             strength,        //attacking strenght of the user
  73.             defense,         //defensive strenght
  74.             condoms,         //condoms user has
  75.             since_got_laid,  //days since the user last got laid
  76.             drug_hits,       //the hits of drug that the user has
  77.             drug_days_since; //if addicted how long the user
  78.                      //has not used the drug
  79.  
  80.     //long type records
  81.     long            hitpoints,       //users hitpoints
  82.             maxhitpoints;    //maximum of the users hitpoints
  83.  
  84.     //unsigned long type records
  85.     unsigned long   points,          //users points
  86.             money,           //money in hand
  87.             bank;            //money in bank
  88.  
  89.     //unsigned char type records used as values
  90.     unsigned char   level,           //user level
  91.             turns,           //fights the user has left today
  92.             hunger,          // % of hunger
  93.             sex_today,       //sex turns left today
  94.             std_percent,     // % of current std
  95.             drug_addiction,  // % of drug addiction
  96.             drug_high,       // % of how "high" the player is
  97.             hotel_paid_fer,  //for how many more days the hotel
  98.                      //is paid for
  99.             days_in_hospital;//how many days has the use been
  100.                      //in hospital
  101.  
  102.     /*enumerated types stored as unsigned chars!!! (not int)*/
  103.     guy_status      alive;           //user: alive, unconsious, or dead
  104.     sex_type        sex;             //user sex: Male, Female
  105.     guy_type        nation;          //what is he:
  106.                      //punk, headbanger ...
  107.     weapon          arm;             //players weapon
  108.     desease         std;             //current player std
  109.     drug_type       drug;            //current player drug type
  110.     hotel_type      rest_where;      //where the user is staying lately
  111.  
  112.     /*added values BETA 9*/
  113.     char            wtc;             //# of wtc bombings allowed per day
  114.                      //default=1
  115.     char            poison;          //number of poisoning of water allowed
  116.                      //per day, default=1
  117.  
  118.     /*added values v0.10*/
  119.     unsigned char   rocks,           //Rocks, usable in fights
  120.             throwing_ability,//Throwing ability 0-100
  121.             punch_ability,   //Punching ability 0-100
  122.             kick_ability;    //Kicking ability 0-100
  123.     char            InterBBSMoves;
  124.  
  125. /*reserved for future use 3 bytes reset to 0*/
  126.     char            res1;
  127.     int        res2;
  128.       } user_rec;
  129.  
  130. Here is the mail header file NY2008.MSX structure:
  131.  
  132. typedef struct {
  133.     char    sender[25];    //sender character name
  134.     char    senderI[36];   //sender bbsname
  135.     sex_type sender_sex;   //sender sex
  136.     char    n1;            //unused!
  137.     char    recver[25];    //receiver character name
  138.     char    recverI[36];   //receiver bbs name, used for searching mail
  139.     long    location;      //position of the message text in the
  140.                    //NY2008.MSG file
  141.     int     afterquote;    //how many lines are a quote
  142.     int     length;        //how long is the post
  143.     int     flirt;         //flirt flag used for other flags too:
  144.                    //0=no flag normal mail
  145.                    //1=sender wants sex
  146.                    //999=positive reply to flirt 1 (no mail body)
  147.                    //1000=receiver was raped (no mail body)
  148.                    //1001=receiver was defeated (no mail body)
  149.                    //1002=receiver got some money (the amount
  150.                    //stored as text in a one line msg body)
  151.     desease ill;           //sender's illness (std)
  152.     char    n2;            //unused!
  153.     int     inf;           //sender's infection percent (std_percent)
  154.     int     deleted;       //is this mail deleted (TRUE,FALSE)
  155.     } mail_idx_type;
  156.  
  157. Here is how the NY2008.MSG works:
  158.  
  159. location record points to the line where message starts in NY2008.MSG
  160.  
  161. A line (any length is stored as an 80 byte character field) so the position
  162. of a message body is location*80. And just read an 80 character string, (79
  163. characters and a NULL terminating character) each record is 80 char long and
  164. the terminating NULL character is anywhere in this field. If the NULL character
  165. is the first character, it's a blank line!
  166.  
  167. All the other records are in lines as the units, (not bytes) too so if length
  168. is 3 the message is 3 lines long.
  169.  
  170. And online messages. To send an online message, add to or if it does not
  171. exist create a file called "U00<user number>.OMG", and store two, null
  172. terminated strings in it, one of them is 51 characters long (including the
  173. NULL character) and that is the message, the one that follows is the name
  174. of the sender which is 25 characters long. Do not delete this file, and if
  175. it exists add to it, so no messages are lost, in C use the "a+b" mode.
  176. The game will erase it when the user recieves the messages. Do not
  177. send online messages in the SingleNode mode, they would not work.
  178.  
  179. NOTE the .OMG file has to be in the flag directory to be read.
  180.  
  181.  
  182. Here is the newz structure:
  183. files are : NYNEWS.YES for yesterday's news
  184.         NYNEWS.TOD for today's news
  185.  
  186. struct {
  187.   char  tagline[80],
  188.     name[25],
  189.     name2[36];
  190.   int   flag;
  191. } newzfile;
  192. // flag settings//
  193. // 0 - system news (tagline)
  194. // 1 - user announcment (name) anounces (tagline)
  195. // 2 - user BUSTED (name) for (tagline)
  196. // 3 - user newz (name) (tagline)
  197. // 4 - user kicked ass (na